<%inherit file="/base.html"/>

<%def name="main_heading()">${c.main_heading}</%def>

<%def name="toolbar()">

<input class="crud-table-filter" type="text"/>

</%def>

<%def name="content()">

<table id="crud-table" class="data-table">
	<thead>
		<tr>
			% for column in c.columns:
			<th>${column['verbose']}</th>
			% endfor
			<th colspan="2">${_('Actions')}</th>
		</tr>
	</thead>
	<tbody>
		% for record in c.records:
		<tr>
			% for column in c.columns:
			<td>
				% if column['name'] in c.references:
				<a href="${c.references[column['name']](record)}">${c.get_field(record, column)}</a>
				% elif c.view_url and c.view_url[0] == column['name']:
				<a href="${c.view_url[1](record.id)}">${c.get_field(record, column)}</a>
				% else:
				<span>${c.get_field(record, column)}</span>
				% endif
			</td>
			% endfor
			<td class="crud-action edit"><a href="${c.editing_url(record)}">${_('abbr|edit')}</a></td>
			<td class="crud-action delete"><a href="${c.deleting_url(record)}">x</a></td>
		</tr>
		% endfor
	</tbody>
</table>

</%def>